Not applicable.
Not applicable.
1. Field of the Invention
This invention relates to a method for performing online extension of certain data storage areas in an IBM IMS Data Entry Database. More particularly, this invention relates to a method for extending data areas in a Data Entry Database while the database is online. Specifically, the independent overflow portion and the sequential dependent portion data areas of a Data Entry Database can be increased or extended while the database is active to the IMS control region. This method also works for offline database reorganization.
2. Background of the Invention
IMS is one of the oldest and most widely used database systems. It runs under the OS/390 operating system on large IBM 370 and 370-like machines. IMS is based on the hierarchical data model. Queries on the IMS databases are issued through embedded calls in a host language. The embedded calls are part of the IMS database language DL/I.
Because performance is critically important in large databases, IMS allows the database designer a large number of options in the data definition language. The database designer defines a physical hierarchy as the database scheme. Several subschemes may be defined by constructing a logical hierarchy from the segment types comprising the scheme. There is a variety of options available in the data definition language (block sizes, special pointer fields, etc.) that allows the database administrator to xe2x80x9ctunexe2x80x9d the system for improved performance.
A hierarchical database consists of a collection of segments that are connected to each other with relative byte address (RBA) pointers. Each segment is a collection of fields (attributes), each of which contains only one data value. Each pointer provides an association between precisely two segments. One well-known type of IMS hierarchical database is the data entry database (xe2x80x9cDEDBxe2x80x9d). A DEDB is a set of database records stored in a collection of data set partitions called Areas. A DEDB can accommodate up to 240 Areas. An Area contains a range of database records. As shown in FIG. 1, an Area is divided into three portions: a root addressable portion, an independent overflow portion, and a sequential dependent portion.
As shown in FIG. 1, the root addressable portion of an Area contains a logical concept call a unit-of-work (xe2x80x9cUOWxe2x80x9d). Each Area may contain up to 32K UOWs. A UOW consists of a user-specified number of physically contiguous control intervals. A control interval is the unit of transfer between an external storage device and a computer.
A UOW is divided into a base section and a dependent overflow section. The base section contains control intervals that are used for the storage of data. The dependent overflow section of a UOW is used to store data after the base section control intervals of the UOW are full, i.e., are unable to satisfy a request for space.
As shown in FIG. 1, the independent over-flow (xe2x80x9cIOVFxe2x80x9d) portion of an Area also contains control intervals. These control intervals may be used to logically increase the size of a particular UOW. Thus, the IOVF control intervals are logical extensions of the dependent overflow section of a particular UOW. However, once a control interval has been used to increase the dependent overflow section of a particular UOW, only data associated with that UOW may be stored therein. Thus, an IOVF control interval that is allocated to a particular UOW may be considered to be xe2x80x9cownedxe2x80x9d by that UOW.
The first control interval in the IOVF portion contains a space map (xe2x80x9cSMAPxe2x80x9d). This SMAP indicates which UOWs own the following 119 control intervals in the IOVF portion. There is another SMAP for every 120 IOVF control intervals, i.e., the 1st, 121st, 241st, etc. control intervals in the IOVF portion are SMAP control intervals.
The sequential dependent portion (xe2x80x9cSDEPxe2x80x9d) of an Area contains space for storing segment data in a time-ordered sequence without regard to the UOW containing the root segment. The SDEP is used as a circular queue for data storage. The SDEP facilitates rapid insertion of data segments into the DEDB. DEDB puts such data segments in SDEP in the order it received them. This allows fast entry of data segments, since data segments are stored one after another. However, retrieving logically related data records is not efficient or fast, because such related records may be physically scattered throughout the SDEP and not in a logical order.
When data is stored in a DEDB, the data is associated with a particular UOW. Initially, the UOW""s basic section control intervals will be empty. Thus, the UOW will contain base section control intervals that may be used to store the data. However, as more data is associated with a particular UOW, the base section control intervals will become full.
If additional data is to be associated with a UOW that contains full base section control intervals, then the first control interval within the dependent overflow section of the associated UOW is utilized to store the data. If the first control interval is also full, then the second control interval within the overflow section will be utilized to store the data. Additional data may be similarly associated with the UOW until all control intervals within the dependent overflow section are full.
If additional data is to be associated with a UOW and no space can be found in a UOW""s dependent overflow section, then a SMAP control interval in the independent overflow portion of the Area will be used to acquire any available IOVF control intervals. After these control intervals are full, another SMAP control interval will be used to allocate additional IOVF control intervals. This sequence continues until no unallocated IOVF control intervals are available. When this occurs, the DEDB Area is full.
FIG. 2 illustrates the prior art for increasing space in a DEDB Area. Once the DEDB Area is full, i.e., IOVF or SDEP portions are full, then the DEDB Area must be taken offline and the segment data unloaded. Next, the DEDB Area data set is deleted and re-allocated to allow for more storage space. Then the segment data is reloaded into the newly defined and allocated DEDB Area. Then the DEDB Area is brought online and available for use. While the DEDB is offline, no access to the DEDB is possible, which creates downtime and system unavailability.
There has been a long-standing need to be able to do DEDB Area data set extents while online. DEDBs provide high data storage capacity for continuous support of online activities. DEDB""s Areas are pre-defined and pre-formatted and can not be increased, i.e., extended, while the database is online and running. Therefore, data area must be carefully monitored to avoid running out of space; DEDBs do not support dynamic data set extensions, i.e., storage space cannot be increased while the DEDB Area is online and running.
IBM has a method for increasing physical storage capacity that requires taking the database area offline, making changes to space parameters, unloading and reloading the database Area and then putting the Area back online. This is a cumbersome and time consuming process and not online. Alternatively, the Area can be reorganized, either online or offline, and space may be reclaimed during the reorganization. However, reorganization is time consuming and resource intensive. In addition, reorganization may not free up sufficient space.
As previously stated, DEDBs require vigilant space monitoring because they do not support dynamic area data set extension. If a DEDB Area data set should suffer space problems because the independent overflow or sequential dependent portion has been thoroughly exhausted, then the business application will incur an expensive outage. Resolving a full Area condition has historically been a disruptive and protracted process. The regular procedure of unloading and reloading all the segment data can take substantial time causing significant application downtime.
DEDBs, like all IMS databases, are defined by the Database Description (xe2x80x9cDBDxe2x80x9d) control block. The AREA macros are used in the DBD to describe the number, name and size attributes of each Area within the database. The UOW keyword specifies the number of root anchor point (xe2x80x9cRAPxe2x80x9d) and dependent overflow (xe2x80x9cDOVFxe2x80x9d) control intervals allocated to a single UOW. The ROOT keyword designates the size of the root addressable area (xe2x80x9cRAAxe2x80x9d) and the IOVF in terms of UOWs. The SDEP portion of an Area is the balance of space between the reorganization UOW and the end of the Area data set. Therefore, the size of RAA, IOVF and SDEP portions are a function of the UOW, ROOT and data set allocation parameter values.
Starting with IMS version 3.1, the online Area open process has natively allowed DEDB Areas whose DEDB Areas Control List (DMAC) control interval described an IOVF portion that was larger than the actual DBD definition. The IMS/ESA Version 3 Database Administration Guide (IBM publication SC26-4281-01) outlines a multiple step procedure for extending a DEDB Area data set and placing it back online. This procedure describes the necessary steps for modifying the DBD by proportionately increasing the Area""s ROOT parameter values. The overall size of the RAA cannot be changed in any way, nor can the size of the IOVF be reduced. The SDEP portion can be varied, but should be sized to accommodate all preexisting segments. After regenerating the DBD and Application Control Block (ACB), the segment data in the Area is then unloaded and subsequently reloaded, using the new ACB, into a larger sized Area data set. This new Area data set is then placed back online without having to swap control blocks or cycle the entire subsystem. This prior art method is a cumbersome procedure, error-prone, resource-intensive and, more importantly, too slow. Thus, there is a need for a method for extending the IOVF and SDEP data portions in a DEDB while the database is online and running.
A method is disclosed for extending data Areas in a DEDB database while the database is online. Specifically, the IOVF and SDEP data portions can be increased or extended while the database is active to the control region. This method also works for offline database reorganization.
In one embodiment, the method includes (a) receiving a requested extension size; (b) acquiring additional storage from the operating system; (c) formatting the acquired additional storage as DEDB control intervals; and (d) updating a DEDB areas control list (DMAC) to reflect the increased size of the DEDB areas. While these actions are performed, regions of the data areas currently holding data are not modified and remain available for normal DEDB activity. When block level sharing is enabled, the current IMS process notifies the other IMS processes engaged in block level sharing to prepare for the extension of the DEDB Areas prior to the acquisition of additional storage from the operating system. The other IMS processes are also notified to commit to the extension after the acquisition is accomplished. The current IMS process then proceeds with the formatting and updating. The current process preferably locks the DMAC only during the acquisition and during the updating of the DMAC. The present invention further contemplates information media that conveys software for implementing the method disclosed herein.